package com.boho.system.dao;


             
/**
 * @File name:  TSysFunctionDao.java 
 * @Create on:  2010-05-10 19:30:171
 * @Author   :  陈伟
 *
 * @ChangeList
 * ---------------------------------------------------
 * Date         Editor              ChangeReasons
 *
 */
           

            
import java.sql.Connection;
import java.util.List;

import cn.boho.framework.po.CQuery;
import cn.boho.framework.po.CQueryFactoryTool;
import cn.boho.framework.po.DAO;

import com.boho.common.Constant;
            
/**
 * 【系统功能:T_SYS_FUNCTION】的Dao操作类
 * 
 */
public class TSysFunctionDao extends DAO {
	/**
	* 查询所有【系统功能:T_SYS_FUNCTION】信息
	* @param con
	* @return
	* @throws Exception
	* @author 陈伟
	*
	*/
	@SuppressWarnings("unchecked")
	public static List queryTSysFunction(Connection con)throws Exception{
		StringBuffer sql = new StringBuffer();
		sql.append("select FUNCTION_ID,FUNCTION_NAME,PARENT_FUNCTION,FUNCTION_LEVEL ");
		sql.append("from T_FUNCTION ");
		sql.append("where FUNCTION_LEVEL <> ? and FUNCTION_LEVEL <> ? ");
		sql.append("order by FUNCTION_ID asc");
		CQuery query = CQueryFactoryTool.createFactory().createCQuery();
		query.setString(1, Constant.FUNCTION_TYPE_ANONYMOUS);
		query.setString(2, Constant.FUNCTION_TYPE_ANONYMOUS_SESSION);
		query.setCommand(sql.toString());
		logger.debug("TSysFunctionDao.queryTSysFunction() SQL->" + query.getCommand());
		return query.getDynaBeanMapList("T_FUNCTION", con);
	}

}
